package spi;

import spi.SPIService;
import sun.misc.Service;

import java.util.Iterator;
import java.util.ServiceLoader;

public class SPITest {
    public static void main(String[] args) {
       /** Iterator<SPIService> providers = Service.providers(SPIService.class);
        while (providers.hasNext()) {
            SPIService spiService = providers.next();
            spiService.execute();
        }**/

        ServiceLoader<SPIService> load = ServiceLoader.load(SPIService.class);
        System.out.println("11111111111111111111111111111111111111");
        Iterator<SPIService> iterator = load.iterator();

        while (iterator.hasNext()) {
            SPIService spiService = iterator.next();
            spiService.execute();
        }
        double num1 = 1;
        double num2 = 20.2;
        double num3 = 300.03;
        int re = (int) ((num1+num2+num3)*100);
        System.out.println(re);

        Integer a = new Integer(47);
        Integer b = new Integer(47);
        System.out.println(a.);
        System.out.println(b.toString());
        System.out.println(a==b);

    }
}
